﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using yunbo.Model.BIP;
using yunbo.Repositorys.FPMRepositorys;

namespace yunbo.Controllers.BIPControllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class BD_CPWDController : ControllerBase
    {
        BD_CPWDRepository bD_CPWDRepository = new BD_CPWDRepository();
        [HttpGet("Getcpwd")]
        public IActionResult Getcpwd(string code)
        {
            var quans = bD_CPWDRepository.Getcpwd(code);
            return Ok(quans);
        }
        [HttpPost("PostBD_CPWD")]
        public IActionResult PostBD_CPWD(BD_CPWD bD_CPWD)
        {
            bool rs = bD_CPWDRepository.PostBD_CPWD(bD_CPWD) > 0;
            return Ok(rs);
        }
    }
}
